<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.application.component.view');
jimport('joomla.html.pagination');

class EcommerceViewOrders extends JView
{
	function display($tpl = null)
	{
		global $option, $mainframe;
		$model = &$this->getModel();
		
		$order_id = JRequest::getVar('order_id', 0);
		if($order_id==0){
			$orders = $model->getList();
		
			$this->assignRef('orders', $orders);
		}
		else{
			$order = $model->getOrderDetail($order_id);
			
			$this->assignRef('order', $order);
		}
		parent::display($tpl);
	}
}
?>